from agent import *
from regression_backprop import *

class agent_nn(agent):
	def __init__(self,actions,senses,agent_num=None,fitness_function=None):
		agent.__init__(self,actions,senses,agent_num,fitness_function)
		
		# Make NN
		self.nn=regression_backprop([3,25,5,2],.2,False,100,True)
		self.nn.load('nn1.txt')
	def think(self):
		sradar=self.senses['nclosest_radar']()
		sfeel=self.senses['range_finder']()
		sinput=sradar[0]+sfeel
		print('Input:'+str(sinput))
		output=self.nn.test(sinput)
		print('Output:'+str(output))
		self.actions['move_rel_world'](0,output)
